package com.bm.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName ejyy_workflow_node
 */
@TableName(value ="ejyy_workflow_node")
@Data
public class EjyyWorkflowNode implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private Long workflowId;

    /**
     * 
     */
    private Byte type;

    /**
     * 
     */
    private String fromUserIds;

    /**
     * 
     */
    private String fromDeparmentIds;

    /**
     * 
     */
    private Long relationUserId;

    /**
     * 
     */
    private Boolean applicantAssign;

    /**
     * 
     */
    private String name;

    /**
     * 
     */
    private Boolean category;

    /**
     * 
     */
    private String value;

    /**
     * 
     */
    private Byte opt;

    /**
     * 
     */
    private Boolean optFirstEqual;

    /**
     * 
     */
    private Boolean optSecondEqual;

    /**
     * 
     */
    private Long parentId;

    /**
     * 
     */
    private Long createdAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EjyyWorkflowNode other = (EjyyWorkflowNode) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getWorkflowId() == null ? other.getWorkflowId() == null : this.getWorkflowId().equals(other.getWorkflowId()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getFromUserIds() == null ? other.getFromUserIds() == null : this.getFromUserIds().equals(other.getFromUserIds()))
            && (this.getFromDeparmentIds() == null ? other.getFromDeparmentIds() == null : this.getFromDeparmentIds().equals(other.getFromDeparmentIds()))
            && (this.getRelationUserId() == null ? other.getRelationUserId() == null : this.getRelationUserId().equals(other.getRelationUserId()))
            && (this.getApplicantAssign() == null ? other.getApplicantAssign() == null : this.getApplicantAssign().equals(other.getApplicantAssign()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getCategory() == null ? other.getCategory() == null : this.getCategory().equals(other.getCategory()))
            && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue()))
            && (this.getOpt() == null ? other.getOpt() == null : this.getOpt().equals(other.getOpt()))
            && (this.getOptFirstEqual() == null ? other.getOptFirstEqual() == null : this.getOptFirstEqual().equals(other.getOptFirstEqual()))
            && (this.getOptSecondEqual() == null ? other.getOptSecondEqual() == null : this.getOptSecondEqual().equals(other.getOptSecondEqual()))
            && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getWorkflowId() == null) ? 0 : getWorkflowId().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getFromUserIds() == null) ? 0 : getFromUserIds().hashCode());
        result = prime * result + ((getFromDeparmentIds() == null) ? 0 : getFromDeparmentIds().hashCode());
        result = prime * result + ((getRelationUserId() == null) ? 0 : getRelationUserId().hashCode());
        result = prime * result + ((getApplicantAssign() == null) ? 0 : getApplicantAssign().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getCategory() == null) ? 0 : getCategory().hashCode());
        result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode());
        result = prime * result + ((getOpt() == null) ? 0 : getOpt().hashCode());
        result = prime * result + ((getOptFirstEqual() == null) ? 0 : getOptFirstEqual().hashCode());
        result = prime * result + ((getOptSecondEqual() == null) ? 0 : getOptSecondEqual().hashCode());
        result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", workflowId=").append(workflowId);
        sb.append(", type=").append(type);
        sb.append(", fromUserIds=").append(fromUserIds);
        sb.append(", fromDeparmentIds=").append(fromDeparmentIds);
        sb.append(", relationUserId=").append(relationUserId);
        sb.append(", applicantAssign=").append(applicantAssign);
        sb.append(", name=").append(name);
        sb.append(", category=").append(category);
        sb.append(", value=").append(value);
        sb.append(", opt=").append(opt);
        sb.append(", optFirstEqual=").append(optFirstEqual);
        sb.append(", optSecondEqual=").append(optSecondEqual);
        sb.append(", parentId=").append(parentId);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}